#!/bin/bash

echo "开始安装 MySQL 8.4.5"

mkdir -p /opt/mysql

cd /opt/mysql

echo "下载安装包..."
wget https://zbp-deploy.oss-cn-hangzhou.aliyuncs.com/00.%E8%BD%AF%E4%BB%B6/db/mysql845.tar.gz

tar -zxvf mysql845.tar.gz

rpm -ivh mysql-community-common-8.4.5-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-plugins-8.4.5-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-8.4.5-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-8.4.5-1.el8.x86_64.rpm
rpm -ivh mysql-community-icu-data-files-8.4.5-1.el8.x86_64.rpm
rpm -ivh mysql-community-server-8.4.5-1.el8.x86_64.rpm

echo "MySQL 8.4.5 程序初始化完成"